package org.grow.present.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.grow.present.entity.PurchaseBill;
import org.grow.present.service.PurchaseBillService;
import org.grow.present.mapper.PurchaseBillMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author xieweig
* @description 针对表【PurchaseBill】的数据库操作Service实现
* @createDate 2024-06-05 23:36:27
*/
@Service
public class PurchaseBillServiceImpl extends ServiceImpl<PurchaseBillMapper, PurchaseBill>
    implements PurchaseBillService{

    @Autowired
    private PurchaseBillMapper mapper;
    @Override
    public Boolean removeWhole(PurchaseBill purchaseBill) {

        int i = mapper.removeById(purchaseBill.getBillId());
        if (i!=1) return false;
        mapper.removeItems(purchaseBill.getBillId());
        return true;
    }
}




